Skip to content

Conversation

@stscoundrel
Copy link
Owner

Previously MongoDB did not support passing credentials, although the underlying image does support them.

However, as the current container implementation always sets up replication, auth gets a bit more complicated. A keyfile neds to be generated and a wait needs to be added for auth setup.

In future major version, it would make sense to drop the automatic replication from constructor and move it to option like withReplication

Closes testcontainers#988

@stscoundrel stscoundrel force-pushed the mongodb-credentials branch 6 times, most recently from fd678b5 to aaaa3b5 Compare April 21, 2025 12:05
Previously MongoDB did not support passing credentials, although the underlying image does support them.

However, as the current container implementation always sets up replication, auth gets a bit more complicated. A keyfile neds to be generated and a wait needs to be added for auth setup.

In future major version, it would make sense to drop the automatic replication from constructor and move it to option like withReplication

Closes testcontainers#988
@stscoundrel stscoundrel force-pushed the mongodb-credentials branch 2 times, most recently from d638c2b to cec67f1 Compare April 21, 2025 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@testcontainers/mongodb - how can creds to require be passed?

2 participants